<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.css" />
    <link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css" />

    <script src="https://unpkg.com/swiper/swiper-bundle.js"></script>
    <script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>
    <style>
        #swiper1 {
            height: 300px;
            width: 500px;
            /* background: #ca4040; */
            background-image: url("http://cdn.cnbj1.fds.api.mi-img.com/mi-mall/62dc98a8b2fb5d6fe464219f3f40080b.jpg");
        }

        #swiper2 {
            height: 300px;
            width: 500px;
            /* background: #ff8604; */
            background-image: url("http://cdn.cnbj1.fds.api.mi-img.com/mi-mall/62dc98a8b2fb5d6fe464219f3f40080b.jpg");

        }

        #swiper3 {
            height: 300px;
            width: 500px;
            /* background: #4390ee; */
            background-image: url("http://cdn.cnbj1.fds.api.mi-img.com/mi-mall/62dc98a8b2fb5d6fe464219f3f40080b.jpg");

        }
    </style>
</head>

<body>

    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide" id="swiper1"></div>
            <div class="swiper-slide" id="swiper2"></div>
            <div class="swiper-slide" id="swiper3"></div>
        </div>
    </div>
    <script>
        var mySwiper = new Swiper('.swiper-container', {
            autoplay: true,//可选选项，自动滑动
            speed: 300,
            delay: 100,
        })

        //如果你初始化时没有定义Swiper实例，后面也可以通过Swiper的HTML元素来获取该实例
        new Swiper('.swiper-container')
        var mySwiper = document.querySelector('.swiper-container').swiper
        // setInterval(mySwiper.slideNext(),2000);
    </script>



    <div class="product_info_product_price">
        <div class="overview product_info_product_price">
            <div class="goods-price">
                <div class="layout align-baseline justify-start">
                    <div class="price cur-price">
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>


        // ES6提供的功能
        fetch("http://localhost:3000/data").then(data => data.json())
            .then(data => {
                const price = data.price
                console.log(price);
                document.querySelector('.cur-price').innerHTML = price
            })
    </script>
</body>

</html>